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