Code quality improvements via a thorough JSLinting