Fixed some characters are replaced in styles but not always. More variables instead of constants in the code, flexible generation of folio metadata.