Add database support
Add Smarty.