Code cleanup items from review: https://bugzilla.mozilla.org/show_bug.cgi?id=1038843#c48