edited get_local_changes_as_stream

replaced the change_callback by flatten_and_stor, and removed format() function