Create a MODE enumeration object
Fix errors from review by evocateur
Merge remote-tracking branch 'origin/master' into gh-pages