pep8 pyflakes cleanups

Also move some of instance_config into default config, where it belongs.