Added BM kernel and speeded up CE kernel a bit