Extended class structure. Just sketches for now, dicussion welcome.
Added TODO regarding vectorization of rays.