Code cleanups.
Code cleanups.

Fixed some tests.