moves templates require inside module.exports