code generation using Twig.
added twig templates
add cache dirs to gitignore
added Twig extension, modified template logic.