cleaned up CreateIndex and added Tests