Cleanup: use typedef for structs; make those structs private which aren't used in...