This file needs unit tests.