Small core and unit test refactor.