Removed redundant js

I the second part of the script, I removed the file object arrays and
altered the references to point to the objects made in the first script
(i. e. pictures[x] -> img[x]).