Improve password-strength calculation