Revised CND implementation.