better co_obj alloc/cleanup, remove globals