Some cose improvements