Fixed sort bug in photo viewer.
Roughed in some code to run a 2-second video buffer to improve picture synchronization.