Clean up and split modules.