added lots of David Lamkins patches and an edit capability.