refactoring and tests
Merge pull request #27 from asiniy/url_validator_test

test + refactoring