To keep the layers separate, spread the cream cheese filling all the way to the edges of the pan before putting it into the fridge to set. It is also important to make sure each layer is completely cool before adding another layer.