Third round

All the basic stuff is out of the way, can  begin actually refactoring
important bits.