Some error checking on parameters, and now handling if getting data fails. Fixes #10.