Changed javascript to handle s3 static file storage