Added safeteleport

Also fixed several misc. bugs