Implemented type checking and set expression parsing.