aggressive flattening for 2d arrays, changed many unit tests to accomodate