removed middleware functions from lib/jobs.js