speedups to visual.go