Some refactoring and added deleting of removed jobs (no longer on page).