Refactored code to not repeat in submission.

The main file was changed to not repeat when the photo is taken and when
the photo selector is chosen. Also, the photos are now named their default
when taken, ensuring that they are saved.