hook refactoring
renamed internal variables
always redraw after a command