Use public getters for member variables

Open up for merging bool members into a single enumerated variable.
Use “with” context to garbage-collect XML nodes