Refactor to a class
Add web player init
Refactor output for websocket