moved detections to correct files; fixed several tests