Code improvements, and bug fix in instance type selection in EC2 and LibCloud connectors