Added constructor and destructor for MyList