Heavily refactored patterns, clauses, pseudotypes and select/replace expressions
Fixed old bug in code generation for in-map clauses