Add stop refreshing when indexing

See #331

* add start refreshing and optimizing after data is indexed
* add indexing in background (aka "parallelizing")