Refactor commands into separate modules.