Lots of cleanup and organization.