Fixed GA tracking bug.
Code tidy up
Fixed bug when no profiles existed
Merge remote-tracking branch 'origin/master' into inject-password