Cleanup to prepare for unit testing.