refactoring html into mustache templates