Redesign error handling so that it doesn't shit a brick.