Changed access of some methods to protected to facilitate testing.

Added initialization and termination methods to test.