Changed getExpressions to recursive.