improve shutdown
Merge pull request #15 from CapillarySoftware/better_shutdown

improve shutdown and remove index naming