Adds event handlers and MQTTS