Fix to Register() function to remove old model before trying to add new one

In the register method, it checks if the model already exists in the collection and then throws an error if it does. I was having trouble with this as it caused my code to break, so I instead make it remove the old model if it's there, then it adds the new one just fine.