Optimized getpics.py and viewing of large datasets.