code review: minor refactorings in index view