Job refactoring + contract improvements + test improvents + bug fixes.