Pull request for error handling

Yay for handling errors reasonably!