Get rid of `flatten`.

Closes #102.