Make new code more pythonic

Easier on the eyes and passes flake8. Remove trailing parens and long
namespaces paths.