CVSWriter optimizations and clean up