Changed MagicWorker into a constructor.