Fixed back/forward buttons

Reimplemented the history data used in the past to work again. The Back and Forward buttons will now act correctly. Navigation with multiple tabs is again possible (but a bit buggy!)