Added new COFHlib API and updated to k4lib