Break up into more functions, improve error handling
Merge pull request #4 from scraperwiki/funcy

Break up into more functions, improve error handling