Modified remove to return on obj not found

Previous logic would splice out the last object if the given object was
not contained in the collection (because of calling splice with -1 as
first argument)