Significantly refactored the C&C example