Work on making Flatten agnostic