Merged bulk of mcamuzat's changes, but with translation mode disabled.