Extract job queue related codes as classes