Added more documentation

Explained a few more functions. Not a whole lot of detail, but enough to
get the general overview of what is happening. More to come.