Some code simplifications.
Merge branch 'validator' of github.com:materialsproject/custodian into validator