Moved screen painting routine out of the interrupt handler to prevent stuttering