Unit test and mock data code cleanup.