Added tests to test.js and implemented constructor function for slideshow in main.js