Cleaned up some language and structure in the thesis.