Refactoring.
Used hashchange-events instead of click-events.