refactored sockets, css