working add/edit form, lots of other cleanup