using a more proper publish/subscribe model.  moved old version into mixin module.  added appropriate unit tests.