jslint of codes.

scope enhancement.