added hiranya's code to interact with cloud infrastructures, added keyname/group flags, and refactored accordingly