Tidied into a context manger.