update manually managed memory in lexical scopes to use unique_ptr
instead (i.e. remove manual delete's)