Refactoring Code #1

I wrote code again, and add jshintrc.
I changed to prototype definition.
Please review this code again.