Address various problems with source code as suggested by @demobox and @nacx.

Fixups in code, mock and live tests.
Merge pull request #2 from GreatFruitOmsk/cloudsigma2-api

Address various problems with source code as suggested by @demobox and @...