Added code by Sander Naert, Ghent University, integrating FoLiA support (untested yet), will be basis for further FoLiA-aware expansions