Introduced a new PieceLayerFactory class