Added socket server support, UI and event tweaks