10,000 tiny fixes

Got the example app almost working with leaflet.