Complicated stupid framework used for some legacy code