initialized some variables

also added parameter for ungrouped quads, but will need them split into
three groups based on orientation for this to work.