Rewrote drawGrid() to use lines and revised event handling.