Cleaned up some code. And started paper.