Template fixups
Automatic unlink fixup

Automatic unlink feature didn't work so well without the unlink()...