fix stupid typos and cut and paste bugs
switch over to refactored GV type checking (where translation to CP is
done in a separate phase)