Use short url
For loop hasOwnProperty check

Makes the code ugly, but it's a necessary evil.