some additions, some generation fixes