some code refactoring

preparing for 2nd user Bluetooth threads