Tidied up some PEP8 violations and added docstrings for all classes and methods.