Google analytics, initial commit (bug fixes, refactorings)