Many corrections and regression fixes