Add tests to check previous behavior of allowed_domains and to test the case when using the 'all' keyword, refactor code a bit based in feedback