Clean up some debug code, spelling and grammar, give some error scenarios more helpful messages.