Cleaned up the code. Main point is that we fixed the "ramping", plus I don't think the bottlneck is the raytrace anymore.