photoviewer.py cleaned up