Grouping observations based on ID number

The observations are now grouped based on the temporary ID number, not
the checksum from the location and such. Also fixed bug that was
omitting last observation. Added new unit tests for updated code as
well. Changes apply to Rest and mock