Managed to get basic sorting working for photo listing!