Refactord data extraction.