More util refactoring
util -> index
Finished refactoring of utils.