Next pass of categorizing sharding code into modules