Added a context management utility