Added test cases for cloud.rb, also included martin's feedback