Updated tests
Updated sorting by distance
Merge branch 'json_data_handling' of https://github.com/cs27x/team5 into json_data_handling