convert functions.php to use OO style f3.  Remove deprecated error function