Refactor based on code review to not duplicate the path information.