thumbnail overlap fix, and some cleanup