Refactor and cleanup workers