Fixed save on edit.
Enhanced edit to make sure only one field is active for editing at a time, and reduced duplicate code.