Minor style changes
Added check for empty URL