Changes to get rith of the 20158 table. Sorry for the big commit.