Added a lot of error handling

Added a lot of code to ensure that even if the tracker breaks, the app
will not.
To debug code, and actually see when something breaks, set
Tracker.Debug to true.