Reorganized extract() method.