cleaning up viewer