temporarily abandoming flatten
added xFlatten, tests, x_ methods
merged xFlatten. Closes #33