Manually merged V's pull request and added some comments to functions. The merge mostly involved getting rid of checkLocation method and getting rid of duplicate testLocation methods.