Refactored commandView