Complete previous commit and update tests.