Added possibility for enabling/disabling a job + unit tests
Fix return code