Update translation handling

Also fix some whitespace.