Moved back-buffer clearing to after flipping the display within refreshDisplay().