Edits to Sergey's thesis