Got rid of unnecessary repaint() call. Might run slightly faster now.