Made the pattern compiler work with Guarded instead of its own representation.
Merged in pattern compiler work.