More modular ray tracing