Refactor and update tests.