Thumbnail code
separate thumbnail code into its own tool