Clean up CA map, clean up indexes, add more testcases