Coded an if statement parser for templates.
Fixed the way if statements from templates were evaluated.