Bug 978327 - Refactor cloud-tools a bit