Fixed location tracking

- Location tracking needed to be called from the main thread.
- Some other stuff that I clearly did a while ago.