Add finalization functions

This PR adds the ability to destroy/finalize a polo instance.