Addressing the trade off between smells and quality when refactoring class diagrams