Make better use of util classes.

Clean up tests.