Rules Engine in Scala