corrected some spelling errors

Fixed some spelling errors I stumbled upon.

There's a lot of code-duplication I'd like to remove, too. The catch-blocks all look the same and there's a TODO to catch NULL everywhere. Refactoring this might be step two if you agree.