Remove redundant parentheses and unreachable code