Cleanup formatting. Read over code, add some comments, etc.