Updated version
Better URL validation