Added support for commands, with the addition of a 'repaint' command (Command-R).