Added edit functionality.  Key flaw in the separate arrays for the different types -- will be merged in next commit.