Trimmed down both parts a little - removed admin screen and some websocket stuff