Thumbnails: Refactor, Make scaleDownImage an anonymous function, remove unnecessary old smooth scaling hack