Major config.php cleanup and a few minor misc fixes.