Split some code into modules.