All typing rules
some fixes