Huge lexer/parser changes, proper kind-checking