Refactored the commands.