raycasting improvements, few UI additions