delete smarty;most of api features completed