Rearranged the order of the methods and properties in this definition, t...

...o be consistent with the original JS code.