Updated Raytracer with needed tracing functions