Restructuring to use messagebroker-phplib