Updates to Migrations and table optimization