Improve data extraction algorithm.