Cleaned up lidar/shapefile detection and branching.