Refactor future history queue
Split ui and add tab support