Renaming smarty plugins
Refactoring class names, further bug fixing