Updated to final thesis version.

Final version of code used for thesis research. Mostly just better
documentation of code.