Implemented remove method.