refactor mqtt server and skynet integration