moved visibility splitting over to cleanfigure