Fixed bug, now assume keys

- All operations assume data of key-value pairs, fixed classification
to reflect this convention (by using mapValues instead of map)
- Fixed tests by extracting values