Merge with CTS2 fork.