Fix the code bad smells.