Tests for web url and small refactor

love it