Clean up button states and selection for tab bar. Fixes #10.