More refactoring to make the code reusable. Added initial cut at PrestoJobManagerImpl.