Added a couple of safety checks, better formatting, and fixed the translation.