Implement code improvements to src from test.