Refactored url check widget code