Fix and improve clarity of address bar hiding code