Invert control flow, fix resizing, and improve checkerboarding significantly

r? @glennw @mbrubeck
Done.