The influence of atomic order and residual strain on the magnetic and structural properties of Ni2MnGa