Integrate changes from bruno for CBV and type-checking. Fix \{ that appeared inside | |.
small fixes