add libco and some cleanup