Changes needed from original ck branch