Made the final touches.
Aded some variable for storing th urls of the S3 instance and the EC instances.
Furthermore Cleaned up the program.
THe program should be error free and can be run.