Close after handling URL

Also converted to ARC