add netrc support and more docstrings