Thesis code.

Added some thesis code.