Fixed GPS distance validation, changed macro to inline function. (no-testing-driven development doesn't work)
Removed syntax errors