Somewhat big cleanup.