Some code reduction and add a sample module to print a CSV