Made some updates: Moved indexes, added more to functions