Add a few methods

These are a few simple methods that have come up a few times: asKeys, flattenValues, and a few minor cleanups.