added simple templates reformatting

Added some basic AST checking to rewrite templates that are static & simple (issue #24)

It follows the same format as @HenrikJoreteg suggests, however it also removes the _locals_ parameter (as it is unecessary)