added the specification of FormulaElement::findInsertPoint() and the corresponding implementation.
added code to insert a formula element that has the higher priority than that of the current element.
moved a variable definition to the place just before which it is used.