Refactor Thumbnail
refactored and tested Thumbnail extension