KRACOEUS-7065 moving some coi code into coi

This pull request is just moving coi code into coi but no other code reorganization is being done at this time.