Implemented deferred and made scheduler, resource manager use it.