Changing the structure of the code to be a little more compact in the setup of the prototype methods