Made flatten methods better to show programmatic growth