Code cleanup in MetaScheduler