Implemented use of factoryclasses in worker module.