Refactored console commands.