Added a bunch of source code documentation.