The contractors for whom I originally took over apparently had a contract to write unit tests, probably for a certain amount of test coverage or something. There was a bunch of dead code buried that was only executed by the tests, apparently to bump up their unit test coverage. This was one of many such horrors. We ultimately told management that it was cheaper to rewrite the thing than it was to fix their backlog of "must have" bugfixes, and it was a huge success. Still didn't fix the radio issues, however.