making TX tab js functions more self contained