Code cleanup and comments. Mostly gpxlayer related.