Extracted from internal SCS for open source release