Added the smarty functions back. Fixed test suite.