Added refreshTables function that will rerender the tables