Adding the basics for actually turning this into a mode, most of it is just template and doesn't actually do anything useful, but it should provide a reasonable starting point.