Integrated sharding to configuration
Integrated sharding to configuration
stripped out all the duplicate code