clone of http://ctemplate.googlecode.com/svn/trunk/