Refactored all the places where a teleportation occurs to call the same function.