Refactor cc registration