added output and redraw mode formals

+ code cleanup