Bugs and optimization

What's changed
---------------------

* Bug resolved for 'message could not be handled' reply
* Refactoring arduino communication class