implemented history, added switchery, fixed submenu selection for threads
fixed thread history switch