minor changes, ready for serverThread makeover
Tested on Arduino board