Rewrite to use the REST API
merge
First stab at tests
Moved string->integer parsing logic into library
Merge pull request #3 from patch0/master

Update to use REST API