Move most top-level items into modules.