implemented selections in legacy C backend, cleaned up selection processing in RoadRunner