Fixed a few bugs in main, including i18n.
Root layout cont'd.