Interim hack conversion to c++

Scurrilous hack to get the program to compile with c++
Use a more c++-ish data model

Still something of an unwieldy mix of c and c++, however the fields
and records are somewhat better encapsulated which allows some of the
repetitive c code to be removed.