Proper error handling for 404s, JSON parsing

Fix #10
Fix #9