Changed the code to use object initalizer for the prototype