Refactor of workers 

Workers are now stored in maps instead of vectors. Made some things much easier in a lot of places. Seems to run fine but might need some checking.

@SheepishMonster @HallCat I recommend ye pull the branch and try it yourself to make sure anything that used to work still works and look through the code for any issues.