Started refactoring the photo layer.