Fix some bugs. Add google analytics