fixed tab spacing
added state tracking to main.js