Fixed API for samples.
Fixed API to support new job internals.