Heavily refactored pattern, clauses, pseudotypes and select/replace expressions
Fixed old bug in in-map clauses