cleaning code and refactoring binarizer