adds google analytics, cleans up some javascript