Added more docstrings and done a bit of cleanup following pylint instructions. Still much to be done.