Now passes all tests for CO
Added comments and doc-strings