Annotating Port.cc refactoring for #32
Make sure top-level objects are deleted. Closes #152.