Tweaks to base.php