[changed] a lot of cleanup in smarty plugins