Removed dead code in esf.hpp with potential memory access violations