code improvements
Full 3D sweep, better raycasting, improved grid dimension handling.