clean up, start adding logic to cover more scenarios: local vs. remote links, invalid URLs etc.