Removed regex for URL parsing.

Now we have one problem. Also simplified body code and removed cast from
offsetWidth/Height.