Adding CreateShard, and related fixes.