Jafari & Job: Some refactoring