Flatten (like the original lib)