Added a bit of the Trident state API and made the TopLocations example more understandable.