Major documentation commit.

Obviously I should have been documenting my code as I
wrote it. Lots of doxygen documentation added to all files.