Refactored config command