Updated Stack and Queue classes to return the appropriate node when either popped or de-queued