Only save cell if it has been changed, minor other fixes