Highly improved the way the document.title gets updated.
Minor code improvements.