Move code out into modules.