Refactoring and support for window.location.hash configuration.