Staticify some stuff, and remove ref.