Added generation of collated CSV file
Fixed minor bugs