Implement history mode. Move video counting to UI