refs #26 Add key display and restructure dialog1 function