Improve interface for testing.