Move input class, add tab close with middle click
Move most tab logic to CustomTabBar