Implement templating and more stuff