Update keymanager kwargs, related to #5120.
pep8 fixes.
Merge remote-tracking branch 'ivan/bug/fix-keymanager-args' into develop