Modified the csv script and Makefile slightly