thumbnail gallery performance improvements!