Refactor more tests