Bug 976706 - Address Ehsan's review

These changes are based upon Ehsan's comments #19 and #21 on this bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=976706