Added thumbnail support
Fixed bug with trailing comma