Refactor index routes