Scala version of BNR's PhotoGallery example