Refactored apply_ck some more