Code to build initial tables.
Removed duplicates