I'd like the constructor function to be as small as possible.
That is, reduce the code in a single function.
So let's move these prototype method outside.