Simplifying and refactoring lrztar logic.