fix whitespaces
more debug output
alternative way to start web sockets server

(this way I can switch debuggin on/off easily)
attempt to fix a thread leak