Tried to add all functionality from old OpenKM 5.0 implementation