Lots of white-space updates after transfer from windows

Also added docstrings to all functions