Added cloud code among other changes