Writing a basic major mode for trifle.