Made remove() methods return the removed value.