Some improvements in gauss_middle