checkpoint : cleanup, and improving APi compatibility
add a wait() sub for jobs to avoid duplicate code
small fix
some cleanup