fix netrc usage; flake8 cleanup