Updated CoFH APIs and fixed some stuff.