Update for nightly
Refactor `n_most_common`
`elements`: return FlatMap
Bring up to date with PR