Refactor check scheduler.