Some cleanup, added debug/verbose messages, Added CSV export