Cleanup of internals.