Fixed issue with having to reload page to run script again.
Removed some unneccesary variables. Changed all strings to use single quote.