Fixing tests. Minor cleanup.