I found the data struct is too tedious and complex

I delete all the code except something reusable next time. I will
rewrite the project after  I get the simpler data model :-(