Changed private methods and member variables to protected for unit tests