Several changes to make the module work with the new Kostache version (4.0)