Refactor and improve performance

* correct method name
* extract method
* improve logging
* add more settings
* add choosing shards
* adapt flux