New canformQ functions. Linearization work. Some minor changes