Various small fixes and updates, including addition of new $config->debugIf option.