Fixing conditionals to use cmp instead of test.