Right now, the product info and table info is all passed as arguments to the function.
This could perhaps be done in a slightly better manner with objects
Context
This could become an issue if more info needs to be added to the csv, as the input arguments would get quite large and would be prone to errors.
Currently
All info is being passed through arguments to the function
Possible Fix
Create a product object which would hold all the info, and just have this object be passed to the function