Added test for InstanceInVPC. Refactored code to make test easier to run.