Prepare ChurchDB for i18n and fix some minor bugs