Fix some non-standard characters + refactoring.