Updated for unit tests.