some refactoring, and a better solution as to determining when
we can reliably render visible images after a rebuild has been done.