CPP code from td1.md separated broken into different files. It certainly does not currently compile