totally refactored main.js to keep setTimeout out of the main function, allows user to linger on pics for unpredictable amounts of time