Major adjustments in functions.php