We derive an improved prescription for the merging of matrix elements with parton showers, extending the CKKW approach. A flavour-dependent phase space separation criterion is proposed. We show that this new method preserves the logarithmic accuracy of the shower, and that the original proposal can be derived from it. One of the main requirements for the method is a truncated shower algorithm. We outline the corresponding Monte Carlo procedures and apply the new prescription to QCD jet production in e+e− collisions and Drell-Yan lepton pair production. Explicit colour information from matrix elements obtained through colour sampling is incorporated in the merging and the influence of different prescriptions to assign colours in the large NC limit is studied. We assess the systematic uncertainties of the new method.