Fix more nonsense
Make sure to close the serial port on application exit

I think this caused lots of problems on my MacBook - the bluetooth device
sometimes completely froze and could only be fixed with a reboot and SMC/PRAM
reset
Add sleep() in serial writer to avoid lost messages on startup
Remove leftovers