Started to repair refraction.
Fixed refraction. Turns out it was a floating point error.
Fixed floating point bug that caused refractions to turn into reflections pseudorandomly.