safe link handeling
cleaned up func names