Adding maximize and minimize commands to defun