Refactor index view