Minor housekeeping including naming anonymous functions, fixing JSLint directives, adjusting variable names for clarity/consistency