Cleaned up teleporter code