Python 3 compatibility and docs
moved settings out