A photo viewer (part of cs193p assignment 4+)