Changed all methods definitions to accept a table_name argument and did some other adjustments