Nearly done with the full simulation. Fixed issues with the ray in refracting method. There is a problem with Cornercube ray-tracing.