Cleaned up code to be easier to read. Implemented fetching a job, running it, and returning the result.