Fixed a lot of bugs and added mixpanel