Cleaned up leftover messy string concatenation.
Fixed commenting of functions, made into docstrings.