Started write-up. Moved some code around in the file.