Refactor cyclic to use an opaque struct