cleaning up functions
Merge branch 'export-static-ui-v2' of github.com:mapbox/tm2 into export-static-ui-v2