Fix #20, clean up bluetooth operations