Added accessor and mutator methods to the Node class