Fixes to CSV output
Re-enabled all compilation, removed debugging prints