Refactering thumbnailer yet again.