Added code to remove broken jobs.
Merge pull request #30 from filinep/rewrite

Added code to remove broken jobs.