Refactor some tests to take advantage of new functions