1. Restructuring raytracer