automatic flush and merge for mutable_dict
improve packaging