Refactored the EC2Slave and the EC2OndemandSlave