make some utility functions protected, removed a few others that are not
used.