Started refactoring into Smarty, and added debug feature