No more duplication in the layer factories