Refactor: Used Java executor framework instead of custom thread handling