Vertical and horizontal packaging machines