MOved template engine code to a seperate folder