Separated view and logic for the what command