refactor index view and move list display functionality to controller