Some fixes, mainly moving many default settings to where they belong
(instead of being hard-coded).