refactoring web_worker to lean on dependencies a bit more