further refactoring - knockout extension and global pubsub pulled out