Remove unnecessary files and rewrite EC2 instance script