Adds state util for building up state, adds emacs modes