save screenshots in tempfiles
refactoring and commenting for clarity
reorganize canvas creation and sliding the div