Added tests for defineAs and setting a template. Trying to use a functional style
Added tests for compile function
split out and moved template engine tests hopefully for better organization