Made several methods public instead of protected.
Generalized some of the typing.