add badges to tab headers and other improvements