Counterpoint code rework