Some basic cleanup and re-org.