[INTERNAL, COMMENT, TEST] Fixes some misaligned code. Reincludes tests for index creation.