Add thumbnail generation
Add tests