changed image urls to use get requests. seperated js into seperate files.