Improve thumbnail preview with size detection
Clean up