get rid of smarty

the smarty tpl engine is not actually being used, so there's no use
including it right now.
eventually we'll have to use a template engine, but then I'd probably go
for twig (or smarty in an updated and composer-friendly way).
move pm functions into class & static calls