Strip old code out of main.
Thumbnails oriented properly.
Optimized thumbnail.
Separate thumbnail builder.