Make some cleanup and start working generating new tables
Fix build after merge