Updated the Remove() function.