Code cleanup and organization.