Started creating proper documentation

About half-way done from the initial version.

This lets me go through my scripts again, so there will likely be a
couple of refactors here and there.