Updated remove method.