further refactoring to shard split logic
more shard split logic fixes