Fixed sections 1-5.

Performs changes outlined by Oliver, as well as some of my own. Just
need to finalise section 6.