Lots of cleanup in functions.php.