Refactored for linter and added worker processing