Added tests for flattened
Removed shape from function mask since it doesn't make sense there
Removed read/write methods that were added back during conflict resolution in another branch