clean up some code. the main image does not persist for some obscure reason!