Refactoring patterns and styles for templates without borders