Add keys function

Returns all the keys

Also moves the 'id' and 'uuid' keys to '$id' and '$uuid' as a minimal
effort to avoid conflicts.