Refactored 6.11 to remove redundant code.