Ownership and resource management

[FIXME] Add general remarks about ownership/resources here.