Clean up snapshot(). Make main() execute behavior