Refactor. Use latest stuff from cloudly.
Merge pull request #7 from hdemers/refactor

Refactor. Use latest stuff from cloudly.