cleanup code a bit, add support for diffusions even with no ray intersection