Changes to avoid Unauthorized exception break photo migration and code style.
Fix typos.