fixed formatPoints function and scoping on query function
Merge pull request #6 from Amicus/fix/formatPoints

fixed formatPoints function and scoping on query function