(function($) {
    $.extend($.fn, {
        yapsm: function(options) {
            var passwordStrengthMeter = new $.yapsm(options);

            $(this).keyup(function() {
                var strength = passwordStrengthMeter.strength(this.value);
            });

            return this;
        }
    });

    $.yapsm = function(options) {
        this.settings = $.extend({}, $.yapsm.defaults, options);
        this.entropyMap = $.extend({}, $.yapsm.entropyMap);
        this.field = $(this);
        this.init();
    };

    $.extend($.yapsm, {
        defaults: {
            fieldClass: 'yapsm',
            shortClass: 'too-short',
            weakClass: 'weak',
            fairClass: 'fair',
            goodClass: 'good',
            strongClass:'strong',
            veryStrongClass: 'very-strong'
        },

        entropyMap: {
            decimal: {
                count: 10,
                entropy: 3.32
            },
            hexadecimal: {
                count: 16,
                entropy: 4.00
            },
            mixedCaseLettersOnly: {
                count: 26,
                entropy: 4.70
            },
            mixedCaseLettersAndNumbers: {
                count: 36,
                entropy: 5.17
            },
            caseSensitiveLettersOnly: {
                count: 52,
                entropy: 5.70
            },
            caseSensitiveLettersAndNumbers: {
                count: 62,
                entropy: 5.95
            },
            otherCharacters: {
                count: 94,
                entropy: 6.55
            }
        },

        prototype: {
            init: function() {
                this.commonWords(this.settings.dictionary);
            },

            commonWords: function(dictionary) {
                var commonList;
                var dictionaryType = typeof(dictionary);

                if (dictionaryType == 'function') {
                    // TODO
                }
                else if (dictionaryType == 'object') {
                    commonList = dictionary;
                }
                else {
                    commonList = new Array();
                }

                this.dictionary = commonList;
            },

            strength: function(password) {
                var entropyOfCharSet;
                var bits;
                var dictionaryWord = this.commonWord(password);

                if (!dictionaryWord) {
                    entropyOfCharSet = Math.log(this.numberOfPossibleSymbols(password)) / Math.log(2);
                    bits = entropyOfCharSet * password.length;
                }

                return bits;
            },

            commonWord: function(password) {
                var lPassword = password.toLowerCase();
                var dictionaryWord = false;

                for (var i=0; i<this.dictionary.length; i++) {
                    var commonWord = this.dictionary[i].toLowerCase();

                    if (lPassword == commonWord) {
                        dictionaryWord = true;
                        break;
                    }
                }

                return dictionaryWord;
            },

            numberOfPossibleSymbols: function(password) {
                var character;
                var score = 0;
                var inclDecimal, inclLowerCase, inclUpCase, inclOther;

                for (var i=0; i<password.length; i++) {
                    character = password.charAt(i);

                    if (typeof(inclDecimal) == 'undefined' && /[0-9]/.test(character)) {
                        inclDecimal = true;
                        score += this.entropyMap.decimal.count;
                    }
                    if (typeof(inclUpCase) == 'undefined' && /[A-Z]/.test(character)) {
                        inclUpCase = true;
                        score += this.entropyMap.mixedCaseLettersOnly.count;
                    }
                    if (typeof(inclLowerCase) == 'undefined' && /[a-z]/.test(character)) {
                        inclLowerCase = true;
                        score += this.entropyMap.mixedCaseLettersOnly.count;
                    }
                    if (typeof(inclOther) == 'undefined' && "`~-_=+[{]}\\|;:'\",<.>/?!@#$%^&*()".indexOf(character) >= 0) {
                        inclOther = true;
                        score += this.entropyMap.otherCharacters.count;
                    }
                }

                return score;
            }
        }
    });
})(jQuery);

@@ -2297,50 +2297,16 @@
 var 
-entropyOfCharSet;%0A                var bits
+strength
 ;%0A  
@@ -2431,74 +2431,207 @@
     
-entropyOfCharSet = Math.log(this.numberOfPossibleSymbols(password)
+var bits = this.passwordStrength(password);%0A                %7D%0A%0A                return strength;%0A            %7D,%0A%0A            charSetEntropy: function(charSet) %7B%0A                return Math.log(charSet
 ) / 
@@ -2655,24 +2655,28 @@
         
+%7D,%0A%0A
         
 bits = e
@@ -2671,33 +2671,11 @@
     
-bits = entropyOfCharSet *
+   
  pas
@@ -2683,63 +2683,179 @@
 word
-.l
+Str
 ength
-;%0A                %7D%0A%0A                return bits
+: function(password) %7B%0A                var charSet = this.numberOfPossibleSymbols(password);%0A%0A                return this.charSetEntropy(charSet) * password.length
 ;%0A  

Move password entropy calculation and charset entropy calculation into separate functions.