Added more data extraction magic and Perl loop cuteness