Remove references to function dir