Remove dl call to extension. Fix pass by reference to end()