Pattern Matching and Guards

Pattern matching and guarding statements.
Merging changes.

Merging changes.