Refactored the constructor and made a separate job constructor.