Clean up code. Open with blog given in URL.

* Now if the URL has a #blog-name we open that blog.
* Clean up a little the code.