Factorize cowboyapp.template.