Refactored the commands, dividing them into smaller jobs.