Separated view and logic for the inventory command