Refactoring, tests
Merge pull request #3 from scraperwiki/test

Refactoring, tests