Added before & after edit model hooks. See issue #209.