Refactor asserts.