Added support for glossy reflections, fixed a number of bugs with the kernel