Remove extra spaces.
Use array map for simple stuff.
Make isSchedulerWorker() more readable and consistent with isRunningSchedulerWorker()