Tidy up and internationalize messy code.