added function scope to all js
Merge pull request #18 from TaviscaSolutions/location-service

added function scope to all js