Tab cleanup, bug fix