Move thumbnail rendering to a more appropriate spot