Also fixed bug in layer.py where we weren't: a) Setting the index_name to a default value. b) Weren't using index_name.