Prevent reference error from being thrown in worker context
Don't rely on console anymore
Remove duplication
Add worker example