Fixes issue with an exception during command execution.
Reformating code of SocketService
Replaces Bus with bus wrapper to avoid runtime exception