Adapted to latest Clashsoft API