Added more checks
Added url support