Partially implemented event loop and traversing of the history.