Clean up of additional code, added in new sql file to correct missing instances in instance.