Some docstrings have been rewritten and written.
Renamed variables to follow PEP8.
Fixed some identation for better readibility.