Added implementOn() method and relevant tests

This implements event pub/sub functionality on other classes.