Jobs refactor

Refactor of Jobs module plus other things found in the way.