Generalize so not quite so specific to ec2

These are some changes I made so that I can execute most of your examples on my OpenStack VM.