Beginning of DM editor. Still has way too much of the sample code in it.