Major changes

I've made major changes to your script.
I hope you enjoy