Refactoring from Task to Parallel class for the sake of scalability