Refactor WebWorker Class and Spec