restructured scheduler to be consistent with other modules