missing static qualifier on method
removed unused methods
default mode set with setMode() rather than direct field set