Refactoring to make indices updatable

* Clean up views into separate files
* Add an elasticsearch configuration capability
* Allow indices settings to be updated from config
* Move connection settings around
why not iterate over all the records?