Making some methods public for testing.