Refactored the idle mechanism to fix problems with the vnc thread going idle when it shouldn't have.