Added support for if statements in the template engine.