make Flatten() less memory allocations
Merge pull request #1 from koron/eco-flatten

make Flatten() less memory allocations