Small fixes and cleanup
Merge branch 'messaging' of github.com:Countly/countly-server into messaging