Removed unused constants.
Defined fields in the constructor (where they should be) instead of the prototype. Also removed creation of Data objects.