Cleanup of smarty