Rename capture context manager and use new-style classes.