Remove misplaced semicolons.
Fix sing mismatches in assignments and comparisons.