Cleaning up the code: getting rid of extraneous print() statements, etc. and inserting docstrings for all functions.
More docstrings.
Merge branch 'cleanup'