More work on raytrace helper