Moved to Diffbot
Completed algorithm
Added error handling