Removed Devicemessage and refactor action handling to a more general solution
Fix bug that did not allow for reconnection