Refactored. Added geo API support