Better error handling
Add support for static vars
Add support for static vars
Move requires to the top of the template