Scheduled periodicChecks to reduce the number of System.currentTimeMillis calls.
some cleanup.