add readme.md, turn on google analytics

and also some code cleanup