Computer modelling studies of defects and valence states in La2CuO4