Template engine prototype - fixes #20