refactoring ui (jade templates)