added Factory class for simplifying event/pattern/rule creation