Continuation of #99

Added a mapper that determines the key values that will eventually
become the groupids.