Fix numerous warnings and some spelling mistakes.