Tweaks to functions.inc.php