Fixed the remove() method
Implemented toList function