Handling more complex expression

Added some handling of expression rules which are a bit more complex. If
rules describe a function f(x) * a.. Then f(x)*a*b will also pass. and
be recognized.