Minor refactoring of job scripts.
Merge branch 'xae' of github.com:andreirusu/spearmint into xae