Reorganized some things and added clarifying comments