Template engine

Support custom template engine.