finalize,refactor and make cage-extractor much faster