Change remove function to use Option instead