Move photo logic to PhotoUtils helper class