Tests for web url and small refactor