Added more tests and fixed the raycasting and node intersection functions