Removed useless finally clauses and rely on `popattr` when possible.