issue #22 Smarty database connection

removed singleton pattern