Use object prototype to define class method.

It's generaly a good idea to implement class methods directly in the related object's `prototype` to avoid creating a new function for each instance. This should improve overall performances.

See [this thread on SO](http://stackoverflow.com/questions/10500233/javascript-oop-method-definition-with-or-without-prototype#10500304) for more information.