Add context finalization