migrating/refactoring more classic scraperwiki.php functions
more refined refactoring
minor inline comments