Moved the client into a separate file.
More resilient client.
Added comments.
Merge pull request #35 from mcollina/client-refactoring

Extracted a MoscaClient