Refactored a bit and set number of workers to 512 based on a small experiment.