additional style changes and template refactoring