Added new variables in 'variables'.  Used flag to implement different generations of xi from common coding depending on input.  Old method still produces same results, new method runs, and should get correct results after implementing rest of method.