Code and test cleanup.