Move CTR functions to mclib