cdc.cpp - move more stuff out of class