cleaning up photobooth code a bit