Added indexing and fixed cubes.