Fixed heapify, completed implementation of RealTimeScheduler.