New chi Square correction, updated documentation