Refactor into separate modules.