Completed DDC->DC functionality, cleaned up code