minor refactoring to view - mostly docs