Display photo in the same orientation it was taken in. This change also contains some fixes to the ordering of imports.