Begin to refactor into modules.