Index_table now dynamically finds table primary values instead of just displaying the ID of foreign keys.
removed put test lines