[views]minor fixes and refactoring