Added 2D outfiles and finished preliminary 2D loop