Modify MR stacks to only save/destroy when needed

This makes MR stacks faster and more efficient by only calling
save and destroy when needed. That is, a record will only be
saved when it's new (hasn't been saved) and it will only be
destroyed when it hasn't already been destroyed.