Remove dependency on tape ids
misc fixes
Do not free the first mlookup