Some extra asserts and refactoring variable name.