Correct copy constructor of flatten_iterator
Use unique_ptr<T>::reset() instead of unique_ptr<T>::release()
Correct indentations
Fix map_iterator