Reformat dac module to use tc. Clean up code.