Rewrote the teleportation code. Is faster now, and supports other entities