Made it possible to clean up resources created in initialize.