Refactored around TEF