Declare each method as prototype property.

Also, this commit introduce a JSDoc style comments.
Change license from LGPLv3 to 3-clause BSD.