Fixed CloudService unit tests
Fixed misc issues found during test run
Merge pull request #2843 from stankovski/refactoring

Fixed CloudService unit tests