Merge pull request #19 from cowboy129/master

Make routing logic configurable
Fix pubsub mediator bug, add test spec.