Perform final cleanup