Made some types and field protected for better override.  Thanks to
Miroslav Nadhajsky.