Added support for Smarty and removed old template system.