fixed #36 Smarty: rewrite module system