write operation refactoring

The new write commands have a common core for insert, update, and delete.  This refactoring heads toward a common core for write operations so that the new write commands can be integrated cleanly.