added mixpanel token and cleaning up code