-Websocket now works. Also added logic that main application retains
control over individual threads such as port listeners.