added csv generator, fixes for various edge cases in naming and literals