cleaning up code in functions.php