Updated ext lib templates.
Implemented broker publish and subscribe.