First draft of mode support.
Added four modes, most of which don't do anything.