Started edit routine.
Finished adding edit function.