Refactoring
Prepare for shared worker