Added comments; set up some useful functions.

I’m about to begin the actual thingy.