A bit of refactoring for taking photos.Some cleanup is necessary now.