extractUrls, replaceUrls and isUrl methods added