Bug 1034780 - Fixed jshint errors and revise function name.