initial countly integration
bug fixes and misc tickets