added thumbnails when there is an image, restyled documents