Fleshed out some of the worker logic and commented some of the sections that need completing