resource cleanup; resolves #82