rename viewer to photoviewer
fix cache (size() does not work like this)
preload only one photo before the current one