Refactor to a single raycaster with fewer rays