Creating base structure for indexing